﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="NoticeQuery.aspx.cs" Inherits="CentralOffice.WebClient.PublicAffairs.NoticeQuery" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
    <link rel="stylesheet" type="text/css" href="../theme/2/style.css" />
</head>
<body class="bodycolor" topmargin="5">
<div style="margin-top:10px;"><img src="../images/sys_config.gif" WIDTH="22" HEIGHT="20" align="absmiddle" /><span class="big3">通知查询</span></div>
    <form id="form1" runat="server">
    <ajaxToolkit:ToolkitScriptManager runat="server" ID="sm"  />
    <table class="TableBlock" width="90%" align="center">
   <tr>
       <td nowrap class="TableData">通知标题：</td><td nowrap class="TableData"><asp:TextBox ID="txtName" CssClass="BigInput" runat="server"></asp:TextBox></td>
       <td nowrap class="TableData">重要程度：</td><td nowrap class="TableData"><asp:DropDownList ID="ddlSignificant" runat="server"></asp:DropDownList></td>
   </tr>
   <tr>
       <td nowrap class="TableData">发布时间从：</td><td nowrap class="TableData"><asp:TextBox ID="txtPublishDate" runat="server" CssClass="BigInput"></asp:TextBox>&nbsp;<img onclick="WdatePicker({el:$dp.$(txtPublishDate)})" src="../inc/js/My97DatePicker/skin/datePicker.gif" width="16" height="22" align="absmiddle"></td>
       <td nowrap class="TableData">到：</td><td nowrap class="TableData"><asp:TextBox ID="txtPublishDateEnd" runat="server" CssClass="BigInput"></asp:TextBox>&nbsp;<img onclick="WdatePicker({el:$dp.$(txtPublishDateEnd)})" src="../inc/js/My97DatePicker/skin/datePicker.gif" width="16" height="22" align="absmiddle"></td>
   </tr>
   <tr>
   <td nowrap class="TableControl" colspan="3" align="center"><asp:Button ID="btnQuery" runat="server" Text="查询"  CssClass="BigButton" OnClick="btnQuery_Click" /></td>
   <td nowrap class="TableControl" colspan="3" align="center"><input type="button" value="添加" class="BigButton" onclick="window.location='NoticeAdd.aspx?operation=add';"><input type="submit" value="复制" class="BigButton" style="margin-left:20px;" /></td>
   </tr>
</table>

<div style="margin-top:20px; margin-left:8px;"><h3>查询结果：</h3></div>

<div style="text-align:center">

<asp:UpdatePanel UpdateMode="Conditional" ID="upNotice" runat="server" ChildrenAsTriggers="true">
<ContentTemplate>
    
<huag:OAGridView  id="gvNotice" runat="server" DataKeyNames="Id" AllowSorting="True" skinid="PagingGridView" ConfirmDelete="true"  DataSourceID="odsNotice"  Width="90%" EnableViewState="false"><%--OnRowDataBound="gv_RowDataBound"--%>
   <Columns>
       <%--<asp:BoundField DataField="Name" HeaderText="名称" SortExpression="Name"  />--%>
       <asp:HyperLinkField DataTextField="Name" DataNavigateUrlFormatString="NoticeView.aspx?id={0}" DataNavigateUrlFields="Id" HeaderText="通知标题" target="_blank" SortExpression="Name"/>
       <asp:BoundField DataField="Significant" HeaderText="重要程度" SortExpression="Significant" />
       <%--<asp:BoundField DataField="Profile" HeaderText="概述" />--%>
       <asp:BoundField DataField="CreatedTime" HeaderText="发布时间" SortExpression="CreatedTime" />
       
       <asp:HyperLinkField  DataNavigateUrlFormatString="NoticeUpdate.aspx?id={0}&operation=edit" DataNavigateUrlFields="Id" Text="编辑" />
       <asp:CommandField ShowDeleteButton="True" DeleteText="删除" />
   </Columns>
</huag:OAGridView>

</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnQuery" />
</Triggers>
</asp:UpdatePanel>


<%--OnSelecting="odsNotice_Selecting" MaximumRowsParameterName="maxRows" StartRowIndexParameterName="startIndex"<asp:Parameter Name="startIndex" Type="Int32" /><asp:Parameter Name="maxRows" Type="Int32" /> <asp:Parameter Name="sortExpression" Type="String"/> --%>
<asp:ObjectDataSource id="odsNotice" runat="server" EnablePaging="True" 
 TypeName="CentralOffice.PublicAffair.BusinessActions.Notification" 
 SelectMethod="GetPaged" SelectCountMethod="GetCount"
 DeleteMethod="DeleteById"
 SortParameterName="sortExpression" >
    <SelectParameters>      
      <asp:Parameter Name="whereClause" Type="String" />
    </SelectParameters>
</asp:ObjectDataSource>
</div>
    </form>
    
    <script type="text/javascript" src="../inc/js/My97DatePicker/WdatePicker.js"></script>
</body>
</html>
